﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace FinalItem.Migrations.MyEartags
{
    /// <inheritdoc />
    public partial class Zooid : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "ZooidBuy",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Document = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Purchasedate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Accountingunit = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Individualtype = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Supplier = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Abstract = table.Column<int>(type: "int", nullable: false),
                    overid = table.Column<int>(type: "int", nullable: false),
                    Ridgepole = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Gield = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Gender = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Stage = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Buyer = table.Column<int>(type: "int", nullable: false),
                    Warehouse = table.Column<int>(type: "int", nullable: false),
                    Productname = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Storagenum = table.Column<int>(type: "int", nullable: false),
                    Regulatenum = table.Column<int>(type: "int", nullable: false),
                    Accountnum = table.Column<int>(type: "int", nullable: false),
                    Onlyprice = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
                    Money = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
                    Unitdiscount = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
                    Accountmoney = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
                    Addpeople = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Exitpeople = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Exitdate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Auditorpeople = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Auditordate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Signbag = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Measuringunit = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TotalWeight = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ZooidBuy", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.CreateTable(
                name: "ZooidSelling",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Salesdate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Document = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Client = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Onlynum = table.Column<int>(type: "int", nullable: false),
                    Transactionprice = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
                    Auditstatus = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Department = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Shippingaddress = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Salesman = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Addpeople = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    AddDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Exitpeople = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Exitdate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Auditorpeople = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Auditordate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Financialauditman = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Financialaudittime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    WareHouseauditman = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WareHouseaudittime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    Pricing = table.Column<decimal>(type: "decimal(65,30)", nullable: false),
                    Grade = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Varietyid = table.Column<int>(type: "int", nullable: false),
                    Gender = table.Column<bool>(type: "tinyint(1)", nullable: false),
                    Sheeptype = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    BreedState = table.Column<int>(type: "int", nullable: false),
                    Ridgepole = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Gield = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Birthdate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
                    BirthWeight = table.Column<int>(type: "int", nullable: false),
                    WeanWeight = table.Column<int>(type: "int", nullable: false),
                    FatherSign = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MotherSign = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MoonAge = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ZooidSelling", x => x.Id);
                })
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "ZooidBuy");

            migrationBuilder.DropTable(
                name: "ZooidSelling");
        }
    }
}
